<template>
  <div>
    <ul class="todo-main">
      <TodoItem v-for="(value,index) in todos" :key="index" :todo="value" :index="index" />
<!--      <TodoItem v-for="(value,index) in todos" :key="index" :todo="value" :index="index" :deleteTodo="deleteTodo"/>-->
    </ul>
  </div>
</template>

<script>
import TodoItem from "./TodoItem";

export default {
  name: "TodoList",
  props: {
    todos: Array,
    // deleteTodo:Function
  },
  components: {
    TodoItem
  }
}
</script>

<style scoped>

/*main*/
.todo-main {
  margin-left: 0px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0px;
}

.todo-empty {
  height: 40px;
  line-height: 40px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding-left: 5px;
  margin-top: 10px;
}

</style>
